.PHONY= doc clean

CC=g++
OPTIONS= -g
DEBUG= #-D DEBUG
LIBDIR=lib
INCLUDEDIR=include
_OBJ= tporo.o tvectorporo.o tpilaporo.o tlistaporo.o tabbporo.o tcolaabbporo.o tdeapporo.o
OBJ = $(patsubst %,$(LIBDIR)/%,$(_OBJ))

D:
	geany ./lib/*.cpp ./include/*.h &

#tad: ./src/tad.cpp $(OBJ)
#	$(CC) $(OPTIONS) $(DEBUG) -I$(INCLUDEDIR) ./src/tad.cpp $(OBJ) -o tad

tad%: ./src/tad%.cpp $(OBJ) clean
	$(CC) $(OPTIONS) $(DEBUG) -I$(INCLUDEDIR) $(OBJ) -o tad $<
	./tad > tad.sal
	diff  ./src/$@.cpp.sal ./tad.sal


$(LIBDIR)/%.o : $(LIBDIR)/%.cpp $(INCLUDEDIR)/%.h
	$(CC) $(OPTIONS) $(DEBUG) -c -I$(INCLUDEDIR) -o $@ $<

doc:
	doxygen

clean:
	clear
	rm -f $(OBJ) ./salida* ./valgrind* ./difer*
